Create a web page presentation using R Markdown that features a plot created with Plotly. Host your webpage on either GitHub Pages, RPubs, or NeoCities. Your webpage must contain the date that you created the document, and it must contain a plot created with Plotly. We would love to see you show off your creativity!
library(plotly)
## Warning: package 'plotly' was built under R version 3.5.3
## Loading required package: ggplot2
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
p <- plot_ly() %>%
add_bars(
x = c("2017", "2018", "2019"),
y = c(204,187,210),
base = c(-204,-187,-210),
marker = list(
color = 'red'
),
name = 'sales'
) %>%
add_bars(
x = c("2017", "2018", "2019"),
y = c(195,190,186),
base = 0,
marker = list(
color = 'blue'
),
name = 'costs'
)
p